package edu.uc.ui;

import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

/**
 * 
 * @author ckattick
 *
 *creates the menu
 */

public class CeasBaseScreen extends Activity {
	
	protected final int LoginScreen = 1;
	protected final int CreateUserScreen = 2;
  
	public CeasBaseScreen() {
	   super();
   
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		super.onCreateOptionsMenu(menu);
		
		menu.add(0, LoginScreen, Menu.NONE, getString(R.string.menuLogin));
		
		menu.add(0, CreateUserScreen, Menu.NONE, getString(R.string.menuCreate));
		
		return true;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item)
	{
		super.onOptionsItemSelected(item);
		
		switch (item.getItemId()) {
		case LoginScreen:
			loadLoginScreen();
			break;
		case CreateUserScreen:
			loadCreateUserScreen();
			
			break;
		}
		return true;
	}
	/**
	 * loads the CreateUser Screen
	 */
	private void loadCreateUserScreen() {
		
		Intent CreateUser = new Intent(this, CreateNewUserScreen.class);
		startActivity(CreateUser);
	}
	/**
	 * loads the Login Screen
	 */
	private void loadLoginScreen() {
		Intent LoginUser = new Intent(this, IntroScreen.class);
		startActivity(LoginUser);
		
	}


	

}
